Skip to content

Conversation

@bozaro
Copy link

@bozaro bozaro commented Sep 18, 2024

Fixes decoding encoding.TextUnmarshaler slice

This change is useful for decoding types like type ObjectID [12]byte (https://github.com/mongodb/mongo-go-driver/blob/2a0310912fc03388a3a38f504619758765d1be15/bson/objectid.go#L28-L29)

Same as #132, #180

@jaitaiwan
Copy link

At first glance, some of the changes don't make a whole lot of sense to me. I'll try to come back and review when I'm less tired.

@dclin02
Copy link

dclin02 commented Oct 22, 2025

I noticed a situation where parsing a uuid.UUID (where type UUID [16]byte) worked, but parsing a []uuid.UUID did not, and reading this code I came here to propose the exact same change this PR already does!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants